<script src="https://mentaljs.googlecode.com/svn/trunk/MentalJS/javascript/Mental.js" type="text/javascript"></script>
<script type="text/javascript">
window.addEventListener('DOMContentLoaded', function() {	
	var html = document.getElementById('MentalRender').textContent, js=MentalJS();
	js.parse({global:true,thisObject:window,options:{eval:true},code:'this.sandboxedFunction=function(str){document.documentElement.innerHTML=str}'});
	this.sandboxedFunction$(html);
}, false);
</script>	
<plaintext id="MentalRender">
<a href="#" onclick="alert(location)">Test</a><script>alert(location)</script>gfhfhfg